-- GENERATED SPELL FOR [Shattered Hand Captain] --


function spell0_16870(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16870', 551, 1)
end

function spell1_16870(pUnit, Event) --@Soul Burden,n/a--
pUnit:FullCastSpellOnTarget(38879,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16870', 596, 1)
end

function spell2_16870(pUnit, Event) --@Toughen,Self--
pUnit:FullCastSpellOnTarget(33962,pUnit)
pUnit:RegisterEvent('Sorts_16870', 641, 1)
end

function Sorts_16870(pUnit, Event)
local choix_sorts_16870 = math.random(0, 2)
if choix_sorts_16870 == 0 then
pUnit:RegisterEvent('spell0_16870', 1, 1)
end
if choix_sorts_16870 == 1 then
pUnit:RegisterEvent('spell1_16870', 1, 1)
end
if choix_sorts_16870 == 2 then
pUnit:RegisterEvent('spell2_16870', 1, 1)
end
end

function mob16870_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16870', math.random(1500, 3000), 1)
end

function mob16870_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16870_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16870_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16870, 1, 'mob16870_Action')
RegisterUnitEvent(16870, 2, 'mob16870_Leave')
RegisterUnitEvent(16870, 3, 'mob16870_Kill')
RegisterUnitEvent(16870, 4, 'mob16870_Die')
